<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>个人中心</title>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<link rel="stylesheet" href="__STATIC__/css/common.css">
<link rel="stylesheet" href="__STATIC__/css/code.css">
<link rel="stylesheet" href="__STATIC__/css/swiper-4.2.2.min.css">
<link rel="stylesheet" href="__STATIC__/css/buycode.css">
<script>
    window.onload = window.onresize =function(){
    	document.documentElement.style.fontSize = 100/750*document.documentElement.clientWidth + "px";
    }    
</script>
</head>
<body>
	<div class="warp warp1">
		<div class="banner">
			<img src="__STATIC__/img/banner_code.jpg" alt="">
		</div>
		<p class="inner1">游戏二维码可以分享到：</p>
		<p class="inner2">QQ群、微信群、微信朋友圈、微信好友、微博、贴吧、论坛、网站、等你能想到的地方。只要有人扫描你的专属二维码，扫描关注就成为你的终身锁定合伙人！合伙人只要在平台支付购买房卡，你就可以到提现中心、提现，购买二维码成功的客户、这等于是您自己的游戏、您下线合伙人在平台成功购买支付所有钱，我们平台一分钱都不收，您可以全额提现。边推广，边玩游戏，边挣钱，很适合在家的宝妈、无业人员、去兼职和全职的去推广！这么好的一款游戏您还在等什么、赶紧去购买属于您专属的推广二维码吧！
		</p>
		<div class="title">我的专属推广码</div>
		<div class="area-place">
			<div class="code-area" id="code-area">
				<img src="" alt="">
			</div>
			<img class="copy-img" src="" alt="">
		</div>
		<!-- <img class="code" src="__STATIC__/img/card.jpg" alt=""> -->
		<div class="title getcode">点击购买推广码</div>
		<div class="swiper-container">
		    <div class="swiper-wrapper">
		        <div class="swiper-slide"><img src="__STATIC__/img/banner.jpg" alt=""></div>
		        <div class="swiper-slide"><img src="__STATIC__/img/banner2.jpg" alt=""></div>
		        <div class="swiper-slide"><img src="__STATIC__/img/banner3.jpg" alt=""></div>
		    </div>
		</div>
	</div>
	<div class="warp warp2" style="display: none;">
		<div class="banner">
			<div class="swiper-container">
			    <div class="swiper-wrapper">
			        <div class="swiper-slide"><img src="__STATIC__/img/banner.jpg" alt=""></div>
			        <div class="swiper-slide"><img src="__STATIC__/img/banner2.jpg" alt=""></div>
			        <div class="swiper-slide"><img src="__STATIC__/img/banner3.jpg" alt=""></div>
			    </div>
			</div>
		</div>
		<div class="choosetime">
		推广码
		</div>
		<div class="timebox">
			<img src="__STATIC__/img/card.jpg" alt="">
		</div>
		<div class="paynum">
			<span>支付费用</span>
			<span>￥98</span>
		</div>
		<div class="pay-btn">
			立即购买
		</div>
	</div>
	<ul class="foot">
		<li class="buy"><a href="{:url('index/buycode')}">购买房卡</a></li>
		<li><a href="{:url('index/code')}">我的邀请码</a></li>
		<li><a href="{:url('index/index')}">个人中心</a></li>
		<li><a href="{:url('index/friend')}">我的合伙人</a></li>
		<li><a href="{:url('index/get')}">奖励中心</a></li>
	</ul>

	<script src="__STATIC__/js/jquery-2.1.4.min.js"></script>
	<script src="__STATIC__/js/swiper-4.2.2.min.js"></script>
	<script src="__STATIC__/js/html2canvas.min.js"></script>
	<script>	 
		var mySwiper = new Swiper ('.swiper-container', {
		    loop: true,
		    autoplay:true
		  }) 
		$.ajax({
		  url: '{:url("index/is_login")}',
		  type: 'post',
		  dataType: 'json',
		  // timeout: 1000,
		  success: function (data) {
		    if(data.code == 0){
		    	window.location.href = 'http://client.rup-china.com/yxzf/index.php/index/index/wechatLogin';
		    }
		  },
		  fail: function (err) {
		    console.log(err)
		  }
		})     

		//
		$.post("http://client.rup-china.com/yxzf/index.php/index/index/qrcode_data",function(result){
			console.log(result)
			if(result.code==2){
				var img_code = result.img_url
				$('.code-area img').attr('src',img_code)
			}
		})  


	    //购买推广码
		$('.getcode').click(function(){
			$.post("http://client.rup-china.com/yxzf/index.php/index/index/qrcode_data",function(result){
				if(result.code==2){
					alert('您的推广码还在有效期')
					return false
				}
				if(result.code==0){
					alert('您需登录后才能购买推广码')
				}
				if(result.code==1 || result.code==3){
					$('.warp1').hide()
					$('.warp2').show()
				}
			}) 
		})
		$('.pay-btn').click(function(){
			 location.href = 'http://client.rup-china.com/yxzf/index.php/index/pay/jsapi?type=tg1'
		})
	</script>

</body>
</html>